package com.nettytime.util.testjiebaonianbao;
import com.nettytime.entity.UserSocket;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.SimpleChannelInboundHandler;

public class EchoServerHandler extends SimpleChannelInboundHandler<UserSocket> {
    @Override
    protected void channelRead0(ChannelHandlerContext ctx, UserSocket user) throws Exception {
        System.out.println("receive from client: " + user);
        ctx.write(user);
    }
}
